package com.baoyi.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.baoyi.content.content;
import com.baoyi.doamin.ImageItem;
import com.baoyi.pooke.R;

public class PaiKuItemWidget extends LinearLayout {

	public PaiKuItemWidget(Context context, ImageItem item) {
		super(context);
		LayoutInflater.from(getContext()).inflate(R.layout.paikuitem, this);
		imageItem=item;
		text = (TextView) findViewById(R.id.renqiTextView);
		text.setText(item.getScore().toString());
		remoteImageView=(RemoteImageView)findViewById(R.id.paikurootimg);
		remoteImageView.setDefaultImage(R.drawable.loading01);
		String url = content.server + item.getSmallmageurl();
		remoteImageView.setImageUrl(url);
	}
	private ImageItem imageItem;

	public ImageItem getImageItem() {
		return imageItem;
	}

	public void setImageItem(ImageItem imageItem) {
		this.imageItem = imageItem;
	}
	private RemoteImageView remoteImageView;
	private TextView text;
}
